package com.nuoniu.sibanyun.service.project.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nuoniu.sibanyun.entity.project.SysSdtProjectCatalogue;
import com.nuoniu.sibanyun.mapper.project.SysSdtProjectCatalogueMapper;
import com.nuoniu.sibanyun.service.project.ISysSdtProjectCatalogueService;
import com.nuoniu.sibanyun.service.project.ISysSdtProjectFileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 项目目录管理 服务实现类
 * </p>
 *
 * @author 小啊刚
 * @since 2021-06-05
 */
@Service
public class SysSdtProjectCatalogueServiceImpl extends ServiceImpl<SysSdtProjectCatalogueMapper, SysSdtProjectCatalogue> implements ISysSdtProjectCatalogueService {

    @Autowired
    private ISysSdtProjectFileService fileService;

    @Override
    public void saveProjectCatalogue(SysSdtProjectCatalogue projectCatalogue) {
        saveOrUpdate(projectCatalogue);
    }

    @Override
    public Page<SysSdtProjectCatalogue> pageList(Page page, SysSdtProjectCatalogue projectCatalogue) {
        return this.page(page);
    }

    @Override
    public void deleteById(Long id) {
        fileService.deleteById(id);
        this.removeById(id);
    }


}
